package com.example.app1.pojo;

import com.example.app1.web.Test1Validation.annotation.MobilePhone;
import com.example.app1.web.Test1Validation.annotation.Username;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

@Data
public class User {

    @Username
    private String name;

    private String password;

    @Min(value = 0,message = "年龄最小为0")
    private Integer age;

    @MobilePhone
    private String mobile;

    @Email(message = "邮箱格式不正确！")
    private String email;

}
